﻿using System.Collections;
using System.Collections.Generic;

namespace Sidvall.Data
{
	public class SimpleServiceDataRowCollection<TEntity> : System.Collections.ObjectModel.Collection<TEntity>, IDataRowProvider, IDataRowProvider<TEntity>
	{
		#region Public Members

		#region Interface Members

		IEnumerable IDataRowProvider.DataItems
		{
			get
			{
				return this;
			}
		}
		IEnumerable<TEntity> IDataRowProvider<TEntity>.DataItems
		{
			get
			{
				return this;
			}
		}

		#endregion

		#endregion
		#region Constructors

		public SimpleServiceDataRowCollection()
		{
		}
		public SimpleServiceDataRowCollection(IEnumerable<TEntity> items)
		{
			if (items == null)
				return;
			foreach (var item in items)
				Add(item);
		}

		#endregion
	}
}
